import request from '@/utils/request'

export const partnerListApi = params => {
  return request({
    url: '/user-service/partner/search',
    method: 'GET',
    params
  })
}

export const resetPwdApi = id => {
  return request({
    url: `/user-service/partner/resetPwd/${id}`,
    method: 'PUT'
  })
}

export const addPartner = data => {
  return request({
    url: '/user-service/partner',
    method: 'POST',
    data
  })
}

export const updatePartner = data => {
  return request({
    url: `/user-service/partner/${data.id}`,
    method: 'PUT',
    data
  })
}

export const delPartner = id => {
  return request({
    url: `/user-service/partner/${id}`,
    method: 'DELETE'
  })
}
